import httpRequest from "../utils/request";

export function GetRecentNotices() {
	return new Promise((resolve, reject) => {
		httpRequest({
			method: "GET",
			url: "/notice",
		}).then(res => {
			resolve(res.data);
		}).catch(err => {
			reject(err);
		})
	})
}

export function GetHistoryNoticesList(params) {
	return new Promise((resolve, reject) => {
		httpRequest({
			method: "GET",
			url: "/notice/history",
			params
		}).then(res => {
			resolve(res.data);
		}).catch(err => {
			reject(err);
		})
	})
}

export function SearchNoticeByTitle(params) {
	return new Promise((resolve, reject) => {
		httpRequest({
			method: "GET",
			url: "/notice/search",
			params
		}).then(res => {
			resolve(res.data);
		}).catch(err => {
			reject(err);
		})
	})
}
